<%@ page language="java" pageEncoding="utf-8" import="java.util.*"%>
<%@page import="entitybean.systemtree.EntityBeanSystemtree;"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>adminindex</title>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css" />
<style>
body{
	background-color: #EAEBE3;
}
</style>
<script language="javascript">
function submit_me()
{
	var username=document.getElementById("username").value;
	var password=document.getElementById("password").value;
	var re_password=document.getElementById("re_password").value;
	var realname=document.getElementById("realname").value;
	var backup=document.getElementById("backup").value;
	var email=document.getElementById("email").value;
	if(username=="")
	{
		window.alert("用户名不得为空!");
		return false;
	}
	if(password=="")
	{
		window.alert("密码不得为空！");
		return false;
	}
	if(re_password=="")
	{
		window.alert("重复密码不得为空！");
		return false;
	}
	if(realname=="")
	{
		window.alert("真是姓名不得为空!");
		return false;
	}
	if(backup=="")
	{
		window.alert("备注不得为空!");
		return false;
	}
	if(email="")
	{
		window.alert("邮箱不得为空!");
		return false;
	}
	if(re_password!=password)
	{
		window.alert("密码和重复密码不相同，请重新确认!");
		return false;
	}
	
	document.getElementById("form1").action="<%=request.getContextPath()%>/insert_admin_form.do?method=insert_admin";
	document.getElementById("form1").submit();
	}
</script>


</head>
<%
	List<EntityBeanSystemtree> list=(List<EntityBeanSystemtree>)request.getAttribute("EntityBeanSystemtreeList");  
%>
<body>


<div class="admin_nei">


<div class="xge">
  <!--<div class="xgetitle"><img src="../../images/admin_38.jpg" alt="" /></div> -->
  <div class="gt">
    
    
    
    <div class="gtt">
   <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a0a297">
     <tr>
       <td bgcolor="#eaebe3">管理员添加</td>
       </tr>
   </table>
   <form id="form1" name="form1" method="post" action="">
   <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#E6E6E6" id="admintxt">
     <tr>
       <td width="14%" align="right" bgcolor="#FFFFFF">用户名：</td>
       <td width="86%" bgcolor="#FFFFFF"><input type="text" name="username" id="username" /></td>
       </tr>
     <tr>
       <td align="right" bgcolor="#FFFFFF">真是姓名：</td>
       <td bgcolor="#FFFFFF"><input type="text" name="realname" id="realname" /></td>
     </tr>
     <tr>
       <td align="right" bgcolor="#FFFFFF">密码：</td>
       <td bgcolor="#FFFFFF"><input type="password" name="password" id="password" /></td>
       </tr>
     <tr>
       <td align="right" bgcolor="#FFFFFF">确认密码：</td>
       <td bgcolor="#FFFFFF"><input type="password" name="re_password" id="re_password" /></td>
       </tr>
     <tr>
       <td align="right" bgcolor="#FFFFFF">E-mail：</td>
       <td bgcolor="#FFFFFF"><input type="text" name="email" id="email" /></td>
     </tr>
     <tr>
       <td align="right" bgcolor="#FFFFFF">备注：</td>
       <td bgcolor="#FFFFFF"><textarea name="backup" id="backup"></textarea></td>
     </tr>
     <tr>
       <td align="right" bgcolor="#FFFFFF">权限：</td>
       <td bgcolor="#FFFFFF">
       <%for(Integer i=0;i<list.size();i++)
       { %>
       <input name="power" id="id" type="checkbox" value="<%=list.get(i).getF_jd()%>" />
       <%=list.get(i).getJd_name()%>
       <%
       double ys=Double.valueOf(i+1)%5;
       if(ys==0.0)
       {
       	out.write("</br>");
       } %> 
       <%} %>
       </td>
       </tr>
     <tr>
       <td bgcolor="#FFFFFF">&nbsp;</td>
       <td bgcolor="#FFFFFF"><input type="button" name="button" id="button" value="管理员添加" onclick="submit_me()"/></td>
       </tr>
   </table>
   </form>
 </div>
    
    
    
    
    </div>
  
</div>
</div>







</body>
</html>
